package zbum.issue.code.web;

import java.util.ArrayList;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import zbum.issue.code.service.CodeService;

@Controller
public class CodeController {
	
	@Resource(name="codeService")
	private CodeService codeService;

	@RequestMapping(value="/code/CodeList.do", method=RequestMethod.GET)
	public String selectCodeList(@RequestParam(value="codeGroupId", required=false) String codeGroupId, @ModelAttribute("codeGroupList") ArrayList codeGroupList) throws Exception {
		codeGroupList = (ArrayList)codeService.selectCodeGroupList();
		
		return "/code/CodeList";
	}
}
